import java.util.Random;

public class demo1 {
    public static void main(String[] args) {
        int[] arry = {2,88,199,666,888,9999};
        int[] newarry = new int[arry.length];
        Random r = new Random();
        for (int i = 0; i < 6;) {
            int randomIndex = r.nextInt(arry.length);
            int prize = arry[randomIndex];
            boolean flag =  contain(newarry,prize);
            if(!flag){
                newarry[i] = prize;
                i++;
            }
        }
        for (int i = 0; i < newarry.length; i++) {
            System.out.println(newarry[i]);
        }
    }

    public static boolean contain(int[] arry,int prize){
        for (int i = 0; i < arry.length; i++) {
            if(arry[i] == prize){
                return true;
            }
        }
        return false;
    }
}
